'use strict';
module.exports = (sequelize, DataTypes) => {
    const User = sequelize.define('User', {
        id: {
            type: DataTypes.INTEGER(11),
            primaryKey: true,
            autoIncrement: true
        },
        name: {
            type: DataTypes.STRING,
            unique: {
                msg: '已添加'
            }
        },
        password: DataTypes.STRING,
        email: DataTypes.STRING
    }, {
        freezeTableName: false,
        tableName: 'users',
        timestamps: true
    });
    User.associate = function (models) {
        // associations can be defined here
    };
    return User;
};
